home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 1.iso
/
toolbox
/
src
/
exampleCode
/
opengl
/
defrasterPort
/
README
< prev
Wrap
Text File
|
1996-11-11
|
2KB
|
51 lines
toolbox/src/exampleCode/opengl/defrasterPort README
defrasterPort: OpenGL & X versions of IrisGL defrasterfont
-------------------------------------------------------------------------------
Porting IRIS GL defrasterfont() to OpenGL
This directory contains example codes which will allow you to use the bitmaps
defined for irisGL defrasterfont() in an openGL environment or X environment.
defrasterfont() is an IRIS GL call that lets you customize raster fonts.
Typically, you customize raster fonts in order to define special marker symbols
that you would use either for annotation or in user interfaces. After you
define the font by using defrasterfont(), you render it using charstr().
glBitmap() is the OpenGL call for rendering bitmaps. Bitmap data is always
stored in 8-bit chunks that are defined from left to right and from bottom to
top.
The bitmap format that X uses differs slightly: Each byte of the bitmap data is
divided into two 4-bit segments, left and right. The defX.c utility first
reverses, then swaps the segments; for example, it converts 00011100 to
00111000.
If you are porting an IRIS GL application to OpenGL and you want to take
advantage of your existing defrasterfont() bitmap data, use the following file
and utilities:
def.h: include file that contains bitmap data.
defi.c: sample utility that shows how you use defrasterfont in IRIS GL.
defo.c: converts and renders to OpenGL window -- use the
routine in this utility to render IRIS GL bitmap data in OpenGL.
defx.c: converts and renders to X window -- use the
routine in this utility to render IRIS GL bitmap data in X.
Note: the bitmap defined in def.h is a smiley face with 4 corners, which shows
a 33x33 glyph.
The test bitmaps are included in the .c files.
Yusuf Attarwala December, 1994
-------------------------------------------------------------------------------